package cc.rengu.redp.bizimpl.upmp.service;

import cc.rengu.redp.bizimpl.upmp.domain.QrcodeBatchInfo;
import cc.rengu.redp.bizimpl.upmp.vo.*;
import cc.rengu.redp.common.domain.QueryRequest;
import cc.rengu.redp.common.exception.RedpException;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.scheduling.annotation.Async;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
* @author 刘玉亮.LL
*/
    public interface IQrcodeBatchInfoService extends IService<QrcodeBatchInfo> {

    IPage<QrcodeBatchInfo> findByPageToMap(QueryRequest request, QrcodeBatchInfo info);

    IPage<Map> findDtlByPageToMap(HttpServletRequest request, QueryRequest queryRequest) throws RedpException;

    IPage<QrcodeForMchntRespVO> findForMchntByPage(QueryRequest request, QrcodeForMchntReqVO qrcodeForMchntReqVO);

    IPage<QrcodeForMchntDtlRespVO> findDtlForMchntByPage(QueryRequest queryRequest, QrcodeForMchntDtlReqVO qrcodeForMchntDtlReqVO) throws RedpException;

    List<Map> findDtlToList(HttpServletRequest request) throws RedpException;

    OperationResult batchQrcode(String qrCodeNum) throws RedpException;

    OperationResult cupsBatchQrcodeQuery(String applyBatchNo, String qrCodeNum);

    OperationResult generateMchntQrCode(String qrCodeNum, String instId) throws RedpException;

    void qrcodeStatusUpd(String qrStatus, String instId, String qrCodeType, String qrCode);

    OperationResult updateQrcodeLogoUrl(String instId, String qRcode, String applyBatchNo, String imageLocalPath) throws RedpException;

    /*批量生成二维码图片*/
    @Async
    void batchQrcodeImage(Iterator<Map> it, String path, HttpServletRequest request, String templatePath, String tempImageData, UpmpUserInfoVO user) throws IOException;
}
